﻿/// <summary>
/// 数据核心
/// </summary>
public class DataKernel {
    static DataKernel _inst;

    public static DataKernel inst
    {
        get
        {
            if (_inst == null)
            {
                _inst = new DataKernel();
            }
            return _inst;
        }
    }

    /// <summary>
    /// 登录请求数据
    /// </summary>
    LoginReqInfo _loginReqInfo;
    public LoginReqInfo loginReqInfo
    {
        get { return _loginReqInfo; }
        set { _loginReqInfo = value; }
    }

    /// <summary>
    /// 用户信息
    /// </summary>
    UserInfo _userInfo;
    public UserInfo userInfo {
        get { return _userInfo; }
        set { _userInfo = value; }
    }

    /// <summary>
    /// 滚动信息
    /// </summary>
    AnnInfo _annInfo;
    public AnnInfo annInfo
    {
        get { return _annInfo; }
    }

    /// <summary>
    /// 系统公告
    /// </summary>
    string _noticeStr;
    public string noticeStr
    {
        get { return _noticeStr; }
        set { _noticeStr = value; }
    }

    public DataKernel()
    {
        _annInfo = new AnnInfo();
    }

    public void Clear()
    {
        _loginReqInfo = null;
        _userInfo = null;
        _annInfo.Clear();
    }
}
